<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"
	trimDirectiveWhitespaces="true"%>
<%@page import="java.util.Date"%>
<%@ include file="../../admin.inc.jsp"%>
<script>
function callback(success, msg) {
	if (success) {
		alertMsg.info(msg);
		navTab.closeCurrentTab();		
		navTab.reload("", {
			lastTabId : ""
		});
	}else{
		alertMsg.warn(msg);
	}
}

</script>
<div class="pageContent">
	<form method="post" id="form_solution_list" action="${webContextPath}/admin/solution/save" onsubmit="return navTabSearch(this)">
	<input type="hidden" name="pageNum" id="pageNum" value="${pageInfo.pageNum}" />
	<input type="hidden" name="numPerPage" id="numPerPage" value="${pageInfo.numPerPage}"/>
	<input type="hidden" name="solution.reservationId" id="solution.reservationId" value="${solution.reservationId}"/>
	<input type="hidden" name="solution.id" id="solution.id" value="${solution.id}"/>
	<div class="panelBar">
		<ul class="toolBar">
            <li><a iconClass="user_edit" href="${webContextPath}/admin/solution/list?solutionId=${solution.id}" target="navTab" mask="true"
               width="530" height="500" title="编辑方案模特" rel="solutionList">
               <span>编辑方案模特</span>
            </a></li>
        </ul>
	</div>
	<div class="pageFormContent" >
	<ul>
		<p>
				<label style="width:100px;">模特人数：</label>
				<input type="text" name="solution.modelNum"  value="${solution.modelNum}" >
			</p>
			
			<p>
				<label style="width:100px;">工作城市：</label>
				<select id="workCityCode" name="solution.workCityCode" >
					<c:forEach var="item1" items="${cityList}">
		            	<option value="${item1.code}"  ${solution.workCityCode==item1.code?"selected":""}>${item1.name}</option>
		            </c:forEach>
				</select>
			</p>
			
			<p>
				<label style="width:100px;">工作地点：</label>
				<input type="text" name="solution.workAddress"  value="${solution.workAddress}"  >
			</p>
		</ul>	
		<ul>
			<p>
				<label style="width:100px;">总工作小时数：</label>
				<input type="text" name="solution.workHours"  value="${solution.workHours}"  >
			</p>
			
			<p>
				<label style="width:100px;">工作类型：</label>
				<input type="text" name="solution.workType"  value="${solution.workType}"  >
			</p>
			
			<p>
				<label style="width:100px;">总价格：</label>
				<input type="text" name="solution.totalAmount" value="${solution.totalAmount}" >
			</p>
		</ul>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
			</ul>
	</div>
	</form>
</div>
<div class="pageContent j-resizeGrid">
	<div class="grid" layouth="65" style="width: 1149px; overflow: auto;">
	<table class="table" width="100%">
		<thead>
			<tr>
				<th width="40">ID</th>
				<th width="70">模特ID</th>
				<th width="70">模特名称</th>
				<th width="50">工作开始时间</th>
				<th width="50">工作结束时间</th>
				<th width="50">总工作小时数</th>
				<th width="50">单价</th>
			</tr>
		</thead>
		<tbody style="text-align:center">
			<c:forEach var="item" items="${list}" varStatus="status">
				<tr target="solutionId" rel="${item.id}" style="">
					<td>${item.id}</td>
					<td>${item.modelId}</td>
					<td>${item.modelName}</td>
					<td><fmt:formatDate value="${item.workStartTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
					<td><fmt:formatDate value="${item.workEndTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
					<td>${item.workHours}</td>
					<td>${item.unitAmount}</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	</div>
	<div class="panelBar" style="bottom:0px">
		<div class="pages">			
			<span>共${size}条</span>
		</div>
		<div class="pagination" targettype="navTab" totalcount="${size}" 
		numperpage="${pageInfo.numPerPage}" pagenumshown="10" currentpage="${pageInfo.pageNum}">
		</div>
	</div>
</div>